var RunLayer5 = BaseLayer.extend({
	arr:null,
	scene:null,
	ctor:function (parent) {
		this._super(parent);
		this.init();
	},
	init:/**
			 * 初始化,
			 */
	function () {
		this._super();
		cc.log("RunLayer5初始化");
		
		// 天平
		this.balance = new Balance(this);
		this.balance.outFama();

		var beaker = new Beaker(this, 10, TAG_BEAKER4, this.callback); 
		beaker.setPosition(cc.p(350, 250));
		beaker.upLineResult();

		this.initIron();
		this.initLamp();
		
		// 物品库
		this.lib = new Lib(this);
		this.lib.init([TAG_LIB_HCl, TAG_LIB_PH, TAG_LIB_ROD]);
	},
	callback:function (p){
		var func = cc.callFunc(this.actionDone, this);
		switch(p.getTag()){
		case TAG_ROD:
			this.doRod(p);
			break;
		}
	},
	actionDone:function(p){
		var func = cc.callFunc(this.actionDone, this);
		switch(p.getTag()){
		case TAG_ROD:
			var ph = this.getChildByTag(TAG_PH_NODE);
			ph.changeColor();
			break;
		}
	},
	doRod:/**
			 * 蘸取一滴溶液放到pH试纸上
			 * 
			 * @param p
			 */
		function(p){
		var rotate = cc.rotateTo(0.3, 45);
		var move = cc.moveTo(0.7,cc.p(360, 320));
		var ber = cc.bezierTo(1, [cc.p(300,500),cc.p(360,500),cc.p(360, 320)]);
		var delay = cc.delayTime(0.3);
		var move2 = cc.moveTo(0.7,cc.p(500,440));
		var move3 = cc.moveTo(0.7,cc.p(400,400));
		var rotate3 = cc.rotateTo(0.3, -45);
		var func = cc.callFunc(this.actionDone, this);
		var seq = cc.sequence(rotate, ber, delay, move2, delay, func, move3, rotate3, this.callNext, this.callKill);
		p.runAction(seq);
	},
	destroy:/**
			 * 销毁
			 */
	function(){
		this.lib.close();
		this._super();
	},
	onExit:function(){
		this._super();
	}
});